package jay.home.bet.domain.logic;

import java.util.List;

import jay.home.bet.dao.CounterDao;
import jay.home.bet.dao.OddsDao;
import jay.home.bet.domain.Comp;
import jay.home.bet.domain.League;
import jay.home.bet.domain.Team;

class BasicServiceImpl implements BasicService
{

	private OddsDao oddsDao;
	private CounterDao counterDao;

	public Comp getComp(String id)
	{
		
		return oddsDao.getComp(id);
	}
	
	public Comp getCompByDetail(String home, String road, String time)
	{
		return oddsDao.getCompByDetail(home, road, time);
	}

	public League getLeague(String id)
	{
		return oddsDao.getLeague(id);
	}

	public Team getTeam(String id)
	{
		return oddsDao.getTeam(id);
	}

	public void insertComp(Comp comp)
	{
		oddsDao.insertComp(comp);
	}

	public void insertLeague(League league)
	{
		oddsDao.insertLeague(league);
	}

	public void insertTeam(Team team)
	{
		oddsDao.insertTeam(team);
	}

	public void updateComp(Comp comp)
	{
		oddsDao.updateComp(comp);
	}

	public void updateLeague(League league)
	{
		oddsDao.updateLeague(league);
	}

	public void updateTeam(Team team)
	{
		oddsDao.updateTeam(team);
	}
	

	public List<Team> getTeamsByLeague( String leagueid )
	{
		return oddsDao.getTeamsByLeague(leagueid);
	}
  
	public List<League> getLeagues()
	{
		return oddsDao.getLeagues();
	}
	
	public String getConfig(String key)
	{
		return counterDao.getConfig(key);
	}
	
	public List<Comp> getSettlableComps(int page, int range)
	{
		return oddsDao.getSettlableComps(page, range);
	}

	public OddsDao getOddsDao()
	{
		return oddsDao;
	}

	public void setOddsDao(OddsDao oddsDao)
	{
		this.oddsDao = oddsDao;
	}

	public CounterDao getCounterDao()
	{
		return counterDao;
	}

	public void setCounterDao(CounterDao counterDao)
	{
		this.counterDao = counterDao;
	}
}